home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1995 February: Tool Chest / Dev.CD Feb 95 / Dev.CD Feb 95.toast / Tool Chest / Development Tools & Languages / Dylan Related / Mindy-1.1 (sources only) / mindy-1.1 / interp / class.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-06-28  |  2.1 KB  |  65 lines  |  [TEXT/ttxt]

  1. /**********************************************************************\
  2. *
  3. *  Copyright (c) 1994  Carnegie Mellon University
  4. *  All rights reserved.
  5. *  
  6. *  Use and copying of this software and preparation of derivative
  7. *  works based on this software are permitted, including commercial
  8. *  use, provided that the following conditions are observed:
  9. *  
  10. *  1. This copyright notice must be retained in full on any copies
  11. *     and on appropriate parts of any derivative works.
  12. *  2. Documentation (paper or online) accompanying any system that
  13. *     incorporates this software, or any part of it, must acknowledge
  14. *     the contribution of the Gwydion Project at Carnegie Mellon
  15. *     University.
  16. *  
  17. *  This software is made available "as is".  Neither the authors nor
  18. *  Carnegie Mellon University make any warranty about the software,
  19. *  its performance, or its conformity to any specification.
  20. *  
  21. *  Bug reports, questions, comments, and suggestions should be sent by
  22. *  E-mail to the Internet address "gwydion-bugs@cs.cmu.edu".
  23. *
  24. ***********************************************************************
  25. *
  26. * $Header: class.h,v 1.6 94/06/27 16:31:32 wlott Exp $
  27. *
  28. \**********************************************************************/
  29.  
  30. /* If this enumeration changes, you must also update "type.h" */
  31. #ifndef type_Id_defined
  32. #define type_Id_defined
  33. enum type_Id {id_Singleton, id_Class, id_SubClass, id_LimInt, id_Union,
  34.           id_NoneOf};
  35. #endif
  36.  
  37. extern obj_t obj_ClassClass;
  38.  
  39. struct class {
  40.     obj_t class;
  41.     enum type_Id type_id;
  42.     boolean abstract_p;
  43.     boolean sealed_p;
  44.     struct library *library;
  45.     int (*scavenge)(struct object *ptr);
  46.     obj_t (*transport)(obj_t object);
  47.     void (*print)(obj_t object);
  48.     obj_t debug_name;
  49.     obj_t superclasses;
  50.     obj_t cpl;
  51.     obj_t direct_subclasses;
  52.     obj_t all_subclasses;
  53. };
  54.  
  55. #define CLASS(o) obj_ptr(struct class *, o)
  56.  
  57. extern obj_t make_abstract_class(boolean sealed_p);
  58. extern obj_t make_builtin_class(int (*scavenge)(struct object *ptr),
  59.                 obj_t transport(obj_t object));
  60.  
  61. extern void init_builtin_class(obj_t class, char *debug_name, ...);
  62.  
  63. extern void setup_class_supers(obj_t class, obj_t supers);
  64.  
  65.